package com.phoenix.store.bi.controller;

import com.phoenix.store.bi.entity.User;
import com.phoenix.store.bi.service.UserService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@AllArgsConstructor
@RestController
@RequestMapping("user")
public class UserController {

    UserService service;

    @GetMapping("list")
    public List<User> getList() {
        return service.list();
    }

    @GetMapping("count")
    public Integer getCount() {
        return service.getCount();
    }
}
